package com.sky.robot.utils;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class SkyPage<T> extends Page<T> {

    private long pageNum;
    private long pageSize;

    public SkyPage(long pageNum, long pageSize) {
        if (pageNum > 1) {
            this.current = (pageNum - 1) * pageSize; // 计算索引页
        } else {
            this.current = 0;
        }
        this.size = pageSize;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
    }

    public long getPageNum() {
        return pageNum;
    }

    public void setPageNum(long pageNum) {
        this.pageNum = pageNum;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }
}
